package com.xh.rufongwallpaper.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "cache")
public class CacheProperties {
    private boolean enabled;
    private String type;
    private long ttl;
    private Endpoints endpoints;

    @Data
    public static class Endpoints {
        private EndpointConfig wallpaper;
        private EndpointConfig category;
        private EndpointConfig favorite;
        private EndpointConfig download;
        private EndpointConfig preference;
    }

    @Data
    public static class EndpointConfig {
        private boolean enabled;
        private long ttl;
    }
} 